From: Krzesimir Nowak Date: Fri, 18 Nov 2016 14:52:46 +0000 (+0100) Subject: notificationDaemon: Guard against invalid D-Bus object paths X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~34 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=1ef8722c52d8e88041b3af61c0ee082c2b40dee7;p=gnome-shell.git notificationDaemon: Guard against invalid D-Bus object paths When making any D-Bus call through the GDBus' proxy wrapper with an invalid D-Bus object path, gnome-shell hangs. Supposedly FdoApplicationProxy constructor should validate the passed D-Bus object path and throw an error if the path is invalid. Since it does not do that, we work it around by making sure that the deduced D-Bus object path is valid or throw an exception if the path is not. https://bugzilla.gnome.org/show_bug.cgi?id=787902 --- diff --git a/js/ui/notificationDaemon.js b/js/ui/notificationDaemon.js index ed8870fe1..84bfec466 100644 --- a/js/ui/notificationDaemon.js +++ b/js/ui/notificationDaemon.js @@ -687,6 +687,8 @@ var GtkNotificationDaemonAppSource = new Lang.Class({ _init: function(appId) { this._appId = appId; this._objectPath = objectPathFromAppId(appId); + if (!GLib.Variant.is_object_path(this._objectPath)) + throw new InvalidAppError(); this._app = Shell.AppSystem.get_default().lookup_app(appId + '.desktop'); if (!this._app)